package com.jingdianjichi.subject.domain.convent;

import com.jingdianjichi.subject.domain.entity.SubjectAnswerBO;
import com.jingdianjichi.subject.domain.entity.SubjectInfoBO;
import com.jingdianjichi.subject.infra.basic.entity.SubjectInfo;
import com.jingdianjichi.subject.infra.basic.entity.SubjectRadio;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 题目转换器 BO->DO
 */
@Mapper
public interface SubjectRadioConverter {

    SubjectRadioConverter INSTANCE = Mappers.getMapper(SubjectRadioConverter.class);

    /**
     * 将BO转换为DO
     *
     * @param subjectAnswerBO 题目BO
     * @return 题目DO
     */
    SubjectRadio converBoToEntity(SubjectAnswerBO subjectAnswerBO);

    /**
     * 将DO转换为BO
     *
     * @param subjectInfoList 题目DO
     * @return 题目BO
     */
    List<SubjectInfoBO> converListInfoToListBO(List<SubjectInfo> subjectInfoList);

    List<SubjectAnswerBO> converEntityTOBOLIST(List<SubjectRadio> result);
}
